package com.aco.fatureapp.enums;

public enum EnumProgress {

	INICIO(-1), EM_ANDAMENTO(-2), FIM(-3), ERRO(-4), SUCCESS(-5);

	private int type;

	private EnumProgress(final int type) {
		this.type = type;
	}

	public int getType() {
		return type;
	}

	public void setType(final int type) {
		this.type = type;
	}

	public static EnumProgress getValueOf(final int codigo) {
		for (final EnumProgress enu : EnumProgress.values()) {
			if (enu.getType() == codigo) {
				return enu;
			}
		}

		return null;
	}
}
